import parsel

with open('新建文本文档.html',mode='r',encoding='utf-8')as f:
    html = f.read()


selector = parsel.Selector(html)

texts = selector.css("p ::text").getall()
for text in texts:
    print(text.strip())